/*
 *  mih_type.h
 *  MIHF
 *
 *  Created by injae song on 11. 3. 4..
 *  Copyright 2011 KyungHee Univ. All rights reserved.
 *
 */

#ifndef MIH_TYPE_H
#define MIH_TYPE_H

typedef enum { TCP, UDP } server_type;

/*************************************
 * MIH message header required types *
 *************************************/

/* Service Identifier : Identifies the different MIH services */
typedef enum _mih_sid {
	SERVICE_MANAGEMENT	= 1,
	EVENT_SERVICE		= 2,
	COMMAND_SERVICE		= 3,
	INFORMATION_SERVICE	= 4
}mih_sid;


/* Operation Code : Type of operation performed */
typedef enum _mih_opcode 
{
	REQUEST		= 1,
	RESPONSE	= 2,
	INDICATION	= 3,
    CONFIRM =4
}mih_opcode;


/* Action identifiers */
typedef enum _mih_service_management_aid  //MIH message for service Management
{
	MIH_CAPABILITY_DISCOVER = 1,
	MIH_REGISTER			= 2,
	MIH_DEREGISTER			= 3,
	MIH_EVENT_SUBSCRIBE		= 4,
	MIH_EVENT_UNSUBSCRIBE	= 5
}mih_service_management_aid;

typedef enum _mih_event_service_aid //MIH message for Event Service
{
	MIH_LINK_DETECTED			= 1,
	MIH_LINK_UP					= 2,
	MIH_LINK_DOWN				= 3,
	MIH_LINK_PARAMETERS_REPORT	= 5,
	MIH_LINK_GOING_DOWN			= 6,
	MIH_LINK_HANDOVER_IMMINENT	= 7,
	MIH_LINK_COMPLETE			= 8
}mih_event_service_aid;

typedef enum _mih_command_service_aid //MIH message for Command Service
{
	MIH_LINK_GET_PARAMETERS			= 1,
	MIH_LINK_CONFIGURE_THRESHOLDS	= 2,
	MIH_LINK_ACTIONS				= 3,
	MIH_NET_HO_CANDIDATE_QUERY		= 4,
	MIH_MN_HO_CANDIDATE_QUERY		= 5,
	MIH_N2N_HO_QUERY_RESOURCES		= 6,
	MIH_MN_HO_COMMIT				= 7,
	MIH_NET_HO_COMMIT				= 8,
	MIH_N2N_HO_COMMIT				= 9,
	MIH_MN_HO_COMPLETE				= 10,
	MIH_N2N_HO_COMPLETE				= 11
}mih_command_service_aid;

typedef enum _mih_information_service_aid 
{
	MIH_GET_INFORMATION	= 1,
	MIH_PUSH_INFORMATION = 2
}mih_information_service_aid;

/*********** BASIC TYPE DEFINITION ************/
typedef enum _BOOLEAN
{
    FALSE = 0,
    TRUE = 1
}BOOLEAN;

typedef unsigned int PERCENTAGE;
/*********** DATA TYPE DEFINITION ************/

typedef enum _MIH_EVT_LIST
{
	MIH_Link_Detected = 1<<0,
	MIH_Link_Up = 1<<1,
	MIH_Link_Down = 1<<2,
	MIH_Link_Parameters_Report = 1<<3,
	MIH_Link_Going_Down = 1<<4,
	MIH_Link_Handover_Imminent= 1<<5,
	MIH_Link_Handover_Complete= 1<<6,
	MIH_Link_PDU_Transmit_Status= 1<<7,
}MIH_EVT_LIST;

typedef unsigned long MIH_CMD_LIST;

typedef enum _STATUS
{
    Success =0,
    Unspecified_Failure=1,
    Rejected=3,
    Network_Error=4
}STATUS;

#endif